﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace IDEweek2
{
    public partial class Form1 : Form
    {
        bool index = false;
        public Form1()
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
            InitializeComponent();

        }

        private void buttononf_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2();
            f2.Show();
        }

        private void buttonci_Click(object sender, EventArgs e)
        {
            Icon = Properties.Resources.ICON1;
        }

        private void buttonri_Click(object sender, EventArgs e)
        {
            Icon = default(Icon);
        }

        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }

        private void buttoncl_Click(object sender, EventArgs e)
        {
            if (!index)
            {
                ChangeLanguage("lt-LT");
                index = true;
            }
            else
            {
                ChangeLanguage("en");
                index = false;
            }

            
                
        }

        private void buttoncc_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];

        }



    }
}
